<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/template.xhtml">
        <ui:define name="body">
            <p:panel header="#{bundle.ListCorrDocAreaTitle}" />
            <h:form styleClass="jsfcrud_list_form">
                <h:panelGroup id="messagePanel" layout="block">
                    <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
                </h:panelGroup>
                <h:outputText escape="false" value="#{bundle.ListCorrDocAreaEmpty}" rendered="#{corrDocAreaController.items.rowCount == 0}"/>
                <h:panelGroup rendered="#{corrDocAreaController.items.rowCount > 0}">
                    <h:outputText value="#{corrDocAreaController.pagination.pageFirstItem + 1}..#{corrDocAreaController.pagination.pageLastItem + 1}/#{corrDocAreaController.pagination.itemsCount}"/>&nbsp;
                    <h:commandLink action="#{corrDocAreaController.previous}" value="#{bundle.Previous} #{corrDocAreaController.pagination.pageSize}" rendered="#{corrDocAreaController.pagination.hasPreviousPage}"/>&nbsp;
                    <h:commandLink action="#{corrDocAreaController.next}" value="#{bundle.Next} #{corrDocAreaController.pagination.pageSize}" rendered="#{corrDocAreaController.pagination.hasNextPage}"/>&nbsp;
                    <p:dataTable value="#{corrDocAreaController.items}" var="item" cellSeparator="1">
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListCorrDocAreaTitle_corrDocAreaPK_idCorrDocArea}"/>
                            </f:facet>
                            <h:outputText value="#{item.corrDocAreaPK.idCorrDocArea}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListCorrDocAreaTitle_corrDocAreaPK_fkTipDoc}"/>
                            </f:facet>
                            <h:outputText value="#{item.corrDocAreaPK.fkTipDoc}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListCorrDocAreaTitle_asunto}"/>
                            </f:facet>
                            <h:outputText value="#{item.asunto}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListCorrDocAreaTitle_fecha}"/>
                            </f:facet>
                            <h:outputText value="#{item.fecha}">
                                <f:convertDateTime pattern="MM/dd/yyyy" />
                            </h:outputText>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListCorrDocAreaTitle_estado}"/>
                            </f:facet>
                            <h:outputText value="#{item.estado}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{bundle.ListCorrDocAreaTitle_area}"/>
                            </f:facet>
                            <h:outputText value="#{item.area}"/>
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="&nbsp;"/>
                            </f:facet>
                            <h:commandLink action="#{corrDocAreaController.prepareView}" value="#{bundle.ListCorrDocAreaViewLink}"/>
                            <h:outputText value=" "/>
                            <h:commandLink action="#{corrDocAreaController.prepareEdit}" value="#{bundle.ListCorrDocAreaEditLink}"/>
                            <h:outputText value=" "/>
                            <h:commandLink action="#{corrDocAreaController.destroy}" value="#{bundle.ListCorrDocAreaDestroyLink}"/>
                        </p:column>
                    </p:dataTable>
                </h:panelGroup>
                <br />
                <h:commandLink action="#{corrDocAreaController.prepareCreate}" value="#{bundle.ListCorrDocAreaCreateLink}"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.ListCorrDocAreaIndexLink}"/>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
